home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / PowerPlant / LColorSwatch / LColorSwatch.h < prev   
Encoding:
Text File  |  1996-09-14  |  1.5 KB  |  43 lines  |  [TEXT/CWIE]

  1. // ===========================================================================
  2. //    File:                        LColorSwatch.h
  3. //  Version:                1.0 - Feb 08, 1995
  4. //    Author:                    Mike Shields (mshields@inconnect.com)
  5. //                            
  6. //    Copyright ©1996 Mike Shields. All rights reserved.
  7. // ===========================================================================
  8. //    LColorSwatch.h        <- double-click + Command-D to see class declaration
  9. //
  10. // Originally based on the code by Brian Hill <lorax@msn.fullfeed.com>
  11.  
  12. #pragma once
  13. #include <LControl.h>
  14.  
  15. class LColorSwatch : public LControl    
  16. {
  17.     public:
  18.         enum         { class_ID = 'Clor' };
  19.         static      LColorSwatch*    
  20.                                 CreateFromStream(LStream* inStream);
  21.                                 LColorSwatch();
  22.                                 LColorSwatch(const LColorSwatch& inOriginal);
  23.                                 LColorSwatch(const SPaneInfo &inPaneInfo, MessageT inValueMessage,
  24.                                                 Int32 inValue, Int32 inMinValue, Int32 inMaxValue, 
  25.                                                 ConstStringPtr inString, RGBColor& inColor);
  26.                                 LColorSwatch(LStream* inStream);
  27.         virtual                ~LColorSwatch();
  28.         virtual void        GetColor(RGBColor& outColor);
  29.         virtual void        SetColor(RGBColor& inColor);
  30.         virtual StringPtr    GetDescriptor(Str255 outDescriptor) const;
  31.         virtual void         SetDescriptor(ConstStringPtr inDescriptor);
  32.         
  33.     protected:    
  34.         virtual void        HotSpotAction(Int16 inHotSpot, Boolean inCurrInside,
  35.                                                     Boolean inPrevInside);
  36.         virtual void        HotSpotResult(Int16 inHotSpot);
  37.         virtual Boolean    PointInHotSpot(Point inPoint, Int16 inHotSpot);
  38.         virtual void        DrawSelf();
  39.         
  40.         RGBColor                mColor;
  41.         LStr255                mPrompt;
  42. };
  43.